package models.admin;

import javax.persistence.Column;
import javax.persistence.Entity;

import org.hibernate.envers.Audited;

import play.db.jpa.Model;

/**
 * @author rjanixz
 * 
 * This class represent the Permission Entity
 */
@Entity
@Audited		//Allow Envers to audit this entity
public class Permission extends Model {

	/**
	 * The permission's name
	 * */
	@Column(unique=true, nullable=false)			// permission's name must be unique and not null
	private String name;
	/**
	 * A brief description about this permission
	 * */
	@Column(length=256)
	private String description;

	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
}
